/**
 * This class is the view model for the Main view of the application.
 */
Ext.define('OrderConvert.view.main.MainModel', {
    extend: 'Ext.app.ViewModel',

    alias: 'viewmodel.main',

    data: {
        name: '订单智能识别管控系统',
        loremIpsum: '',
        settingHtml: 'setting...',
        user: 'users...',
        orderServer: "http://localhost:8081/order",
        sheetUrl: "http://localhost:8081/",
        sheetId: 'Nx-eToxC6yM_'
    },

    stores: {
        orderStore: {
            fields: [
                "id","orderName","orderCode","fileUrl","sheetId","xlsUrl","deleted","fileName","fileType","isConvert","createTime","createBy","modifyBy","modifyTime","ruleName","ruleStatus","tmpFileId"
            ],
            autoLoad: true,
            pageSize: 15,
            proxy: {
                type: 'ajax',
                url: OrderConvertUrl.constant.serverUrl + 'order/list',
                reader: {
                    totalProperty: "totalRow",
                    type: 'json',
                    rootProperty: 'list'
                }
            }
        },
        
        orderRuleStore : {
            fields : [
                "id","name","createBy","createTime","modifyBy","modifyTime","dep","data"
            ],
            proxy: {
                type: 'ajax',
                url: OrderConvertUrl.constant.serverUrl + 'rule/list',
                reader: {
                    totalProperty:"totalRow",
                    type: 'json',
                    rootProperty: 'list'
                }
            },
            autoLoad: true
        }
    }
       

    //TODO - add data, formulas and/or methods to support your view
});
